Skip to content

feat(stake): add --relay for MEV Shield outer signer on stake commands#918

Closed
claytonlin1110 wants to merge 1 commit intolatent-to:stagingfrom
claytonlin1110:feat/stake-relay-mev-shield
Closed

feat(stake): add --relay for MEV Shield outer signer on stake commands#918
claytonlin1110 wants to merge 1 commit intolatent-to:stagingfrom
claytonlin1110:feat/stake-relay-mev-shield

Conversation

@claytonlin1110
Copy link
Copy Markdown

Summary

Implements --relay for btcli stake add/remove/move/transfer/swap commands to allow a separate coldkey (“relay”) to sign the outer MevShield.submit_encrypted extrinsic, while the staking coldkey continues to sign the inner staking extrinsic.

Closes #824

Motivation

Some users need operational separation:

  • the staking wallet signs the actual stake call (inner extrinsic),
  • while a designated relay wallet signs only the MEV Shield wrapper (outer extrinsic), so the staking wallet’s coldkey is not the outer signer.

User-facing Changes

New CLI flag

--relay <wallet name | coldkey SS58>

  • `Resolves to a coldkey wallet whose coldkey is used to sign the outer MEV Shield submission.

Commands updated

  • btcli stake add
  • btcli stake remove
  • btcli stake move
  • btcli stake transfer
  • btcli stake swap

Validation / Rules

  • --relay requires MEV protection.
    If --relay is used with --no-mev-protection, the CLI fails with an error.
  • The relay wallet is validated/resolved from the same wallet base path as the staking wallet:
    coldkey SS58: must match a coldkey present under that wallet path,
    wallet name: must exist as a wallet directory under that wallet path.

Testing

  • I ran py_compile (syntax check) on the modified files to ensure there are no syntax errors.
  • Full pytest tests/ could not be executed in this environment due to a missing system dependency (curses/_curses import failure during test collection).

@claytonlin1110
Copy link
Copy Markdown
Author

@thewhaleking Hi, my first contribution here, Would you please review and comment feedback? Thanks.

@claytonlin1110
Copy link
Copy Markdown
Author

@ibraheem-abe Sorry for pinging as i'm not sure who is the reviewer here... Thanks in advance.

@thewhaleking
Copy link
Copy Markdown
Contributor

Hi @claytonlin1110 ,

Thanks for the contribution, but we're currently in the process of crafting BTCLI v10, so will not be adding any new features at this time.

@claytonlin1110
Copy link
Copy Markdown
Author

@thewhaleking Thanks for your comment. Would you please let me know ETA or review this PR? once finishing v10, we can merge I think.

@thewhaleking
Copy link
Copy Markdown
Contributor

@thewhaleking Thanks for your comment. Would you please let me know ETA or review this PR? once finishing v10, we can merge I think.

Sorry, I should've been more clear. V10 is going to be a total rewrite, so feature will be added during the creation process. You can close this PR.

@claytonlin1110
Copy link
Copy Markdown
Author

claytonlin1110 commented Apr 10, 2026

@thewhaleking May I rework this PR after V10 is released?

@thewhaleking
Copy link
Copy Markdown
Contributor

@thewhaleking May I rework this PR after V10 is released?

The only thing stopping you would be the fact that this feature will be included in v10 already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants